package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DocumentBorrowReturnMapper;
import com.ruoyi.system.domain.DocumentBorrowReturn;
import com.ruoyi.system.service.IDocumentBorrowReturnService;

/**
 * 证件借还Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-22
 */
@Service
public class DocumentBorrowReturnServiceImpl implements IDocumentBorrowReturnService 
{
    @Autowired
    private DocumentBorrowReturnMapper documentBorrowReturnMapper;

    /**
     * 查询证件借还
     * 
     * @param id 证件借还主键
     * @return 证件借还
     */
    @Override
    public DocumentBorrowReturn selectDocumentBorrowReturnById(Long id)
    {
        return documentBorrowReturnMapper.selectDocumentBorrowReturnById(id);
    }

    /**
     * 查询证件借还列表
     * 
     * @param documentBorrowReturn 证件借还
     * @return 证件借还
     */
    @Override
    public List<DocumentBorrowReturn> selectDocumentBorrowReturnList(DocumentBorrowReturn documentBorrowReturn)
    {
        return documentBorrowReturnMapper.selectDocumentBorrowReturnList(documentBorrowReturn);
    }

    /**
     * 新增证件借还
     * 
     * @param documentBorrowReturn 证件借还
     * @return 结果
     */
    @Override
    public int insertDocumentBorrowReturn(DocumentBorrowReturn documentBorrowReturn)
    {
        return documentBorrowReturnMapper.insertDocumentBorrowReturn(documentBorrowReturn);
    }

    /**
     * 修改证件借还
     * 
     * @param documentBorrowReturn 证件借还
     * @return 结果
     */
    @Override
    public int updateDocumentBorrowReturn(DocumentBorrowReturn documentBorrowReturn)
    {
        return documentBorrowReturnMapper.updateDocumentBorrowReturn(documentBorrowReturn);
    }

    /**
     * 批量删除证件借还
     * 
     * @param ids 需要删除的证件借还主键
     * @return 结果
     */
    @Override
    public int deleteDocumentBorrowReturnByIds(Long[] ids)
    {
        return documentBorrowReturnMapper.deleteDocumentBorrowReturnByIds(ids);
    }

    /**
     * 删除证件借还信息
     * 
     * @param id 证件借还主键
     * @return 结果
     */
    @Override
    public int deleteDocumentBorrowReturnById(Long id)
    {
        return documentBorrowReturnMapper.deleteDocumentBorrowReturnById(id);
    }
}
